﻿    function index() {
        master.call(this);
    }
    var options = {
        leftNav: function() {
            $('.line .eachNav').children().mouseenter(function() {
                $(this).addClass("current").siblings().removeClass("current");
                $(this).find(".icon").addClass("iconCurrent");
                var index = $(this).attr("nav");
                $(".allnavContent .navContent" + index).show().siblings().hide();
            });
            $('.line .eachNav').children().mouseleave(function() {
                $(this).removeClass("current");
                $(this).find(".icon").removeClass("iconCurrent");
            });
            $(".allnavContent .navContent").mouseenter(function() {
                var num = $(".allnavContent .navContent").index(this);
                if (num == 0) { $(".line .eachNav .brand").addClass("current").siblings().removeClass("current"); $(".line .eachNav .brand").find(".icon").addClass("iconCurrent"); }
                else if (num == 1) { $(".line .eachNav .function").addClass("current").siblings().removeClass("current"); $(".line .eachNav .function").find(".icon").addClass("iconCurrent"); }
                else if (num == 2) { $(".line .eachNav .price").addClass("current").siblings().removeClass("current"); $(".line .eachNav .price").find(".icon").addClass("iconCurrent"); }
                else if (num == 3) { $(".line .eachNav .outlook").addClass("current").siblings().removeClass("current"); $(".line .eachNav .outlook").find(".icon").addClass("iconCurrent"); }
                else if (num == 4) { $(".line .eachNav .set").addClass("current").siblings().removeClass("current"); $(".line .eachNav .set").find(".icon").addClass("iconCurrent"); }
                else if (num == 5) { $(".line .eachNav .group").addClass("current").siblings().removeClass("current"); $(".line .eachNav .group").find(".icon").addClass("iconCurrent"); }
                else if (num == 6) { $(".line .eachNav .number").addClass("current").siblings().removeClass("current"); $(".line .eachNav .number").find(".icon").addClass("iconCurrent"); }
                else if (num == 7) { $(".line .eachNav .access").addClass("current").siblings().removeClass("current"); $(".line .eachNav .access").find(".icon").addClass("iconCurrent"); }
            });
            $(".allnavContent .navContent").mouseleave(function() {
                $('.line .eachNav').children().removeClass("current");
                $('.line .eachNav').children().find(".icon").removeClass("iconCurrent");
            });
            $('.main1Left .leftNav').mouseleave(function() {
                $(".allnavContent .navContent").hide();
                $('.line .eachNav').children().removeClass("current");
                $('.line .eachNav').children().find(".icon").removeClass("iconCurrent");
            });
        } //leftNav
    };
    $.extend(index.prototype, options);
    var forIndex = new index();
    forIndex.focus(".main1Left .chargeNum", "支持广东省电信手机充值");//充值输入框
    forIndex.switchBanner(".main1Right .topBanner", { time: "3000", action: "hover", isControl: true, counts: "8" });//头部广告轮换
    //forIndex.toggleClass(".main1 .titleTabs", { className: "current", action: "hover" }); //热门精选，切换
    //forIndex.toggleClass(".main3 .RankingTitle", { className: "currentRank", action: "click" }); //热销排行，降价排行，切换
    forIndex.photoGallery(".main3Nav");//品牌展示
    forIndex.photoGallery(".SelectedPhone .Selected",{ size: "1" });//千元精选手机展示
    forIndex.toggleClass(".main4Left .salingList ul", { className: "Oncurrent", action: "hover" });//热卖礼包
    forIndex.leftNav();//左导航
    forIndex.countDown(".main4Right .time span", { time: "january 01,2012 00:00:00" }); //倒计时
    var content = "";
    //forIndex.popup(content, true);
    forIndex.tabs(".titleTabs", { container: 'switchTitle', className: 'current', action: "hover" });
    forIndex.tabs(".main3 .RankingTitle", { container: 'RankingList', className: 'currentRank', action: "click" });

